<?php
/**
 * Created by PhpStorm.
 * User: Xize
 * Date: 2018/4/25
 * Time: 16:43
 */
$client = new Swoole\Client(SWOOLE_SOCK_UDP);
$client->connect('127.0.0.1', 9503, 1);
$i = 0;
while ($i < 3) {
    $client->send('我'.$i."\n");
    $message = $client->recv();
    echo "Get Message From Server:{$message}\n";
    $i++;
}